class BaiduPlateResponse {
  num? logId;
  WordsResultBean? wordsResult;

  BaiduPlateResponse({this.logId, this.wordsResult});

  BaiduPlateResponse.fromJson(Map<dynamic, dynamic> json) {
    logId = json['log_id'];
    wordsResult = json['words_result'] != null ? WordsResultBean.fromJson(json['words_result']) : null;
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = <String, dynamic>{};
    data['log_id'] = logId;
    if (wordsResult != null) {
      data['words_result'] = wordsResult?.toJson();
    }
    return data;
  }

}

class WordsResultBean {
  String? number;
  String? color;
  List<num>? probability;
  List<VertexesLocationListBean>? vertexesLocation;

  WordsResultBean({this.number, this.color, this.vertexesLocation, this.probability});

  WordsResultBean.fromJson(Map<String, dynamic> json) {    
    this.number = json['number'];
    this.color = json['color'];
    // this.vertexesLocation = (json['vertexes_location'])!=null?(json['vertexes_location'] as List).map((i) => VertexesLocationListBean.fromJson(i)).toList():null;

    // List<dynamic> probabilityList = json['probability'];
    // this.probability = <double>[];
    // this.probability?.addAll(probabilityList.map((o) => double.parse(o.toString())));
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['number'] = this.number;
    data['color'] = this.color;
    // data['vertexes_location'] = this.vertexesLocation != null?this.vertexesLocation?.map((i) => i.toJson()).toList():null;
    // data['probability'] = this.probability;
    return data;
  }
}

class VertexesLocationListBean {
  num? x;
  num? y;

  VertexesLocationListBean({this.x, this.y});

  VertexesLocationListBean.fromJson(Map<String, dynamic> json) {    
    x = json['x'];
    y = json['y'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = <String, dynamic>{};
    data['x'] = x;
    data['y'] = y;
    return data;
  }
}
